package com.example.day02.p;

import com.example.day02.CallBack;
import com.example.day02.GetBean;
import com.example.day02.m.M_Model;
import com.example.day02.v.V_view;

import java.util.List;

public class P_Main implements CallBack {
    private M_Model mM_Model;
    private V_view mV_view;

    public P_Main(V_view mV_view) {
        this.mV_view = mV_view;
        mM_Model=new M_Model();
    }

    @Override
    public void getData(List<GetBean.ResultsBean> getlist) {
        mV_view.showData(getlist);
    }

    @Override
    public void Toasi(String str) {
        mV_view.showToasi(str);
    }
    public void getData(){
        mM_Model.getData(this);
    }
}
